package net.peelmeagrape.hibernate;

import net.peelmeagrape.hibernate.xmlgen.XmlAttribute;
import net.peelmeagrape.hibernate.xmlgen.XmlElement;

import java.lang.annotation.Retention;
import static java.lang.annotation.RetentionPolicy.RUNTIME;

/**
 * Declare the tables to synchronize this entity with, ensuring that auto-flush happens correctly, 
 * and that queries against the derived entity do not return stale data.
 */
@Retention(RUNTIME)
@XmlElement(name="synchronize")
public @interface Synchronize
{
    @XmlAttribute("table") String value() default "";
}
